/*
 * @Author: wuqingchun
 * @Date: 2024-06-28 08:36:29
 * @Description: 
 * @LastEditors: wuqingchun
 * @LastEditTime: 2024-06-28 08:58:45
 */
#include <atomic>

/*
 * @Author: wuqingchun
 * @Date: 2024-06-28 08:36:29
 * @Description: 
 * @LastEditors: wuqingchun
 * @LastEditTime: 2024-06-28 08:41:23
 */
#include <atomic>

#include "app_memory_barrier_asm.h"


class CAppMemoryBarrierAsm
{
public:
    void SetData(const Data& refData)
    {
        m_iId = 0x1234;
        m_stData = refData;
        std::atomic_thread_fence(std::memory_order_seq_cst);
        m_iStatus = 2;
    }

private:
    int m_iStatus = 0;
    Data m_stData;
    int m_iId = 0;
};

CAppMemoryBarrierAsm g_objApp;

Data g_stData = {100, 200};

int main(int argc, char** argv)
{
    Data stData = {100, 200};

    g_objApp.SetData(g_stData);

    return 0;
}
